<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/3/9
  Time: 17:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ include file="../common/web_top.jsp" %>
<div class="includeStyle">

        <div class="public-bgContent">
            <div class="bgSortScroll">
                <div class="public-bgContent">
                    <div class="public-bgDate">
                            <span><input type="text" autocomplete="off" id="start_time" class="datepicker" ng-focus="remHight()"
                                         ng-class="{'error':redErr.dateTime}" placeholder="开始时间"
                                         ng-model="param.beginTime"
                                         class="ng-pristine ng-untouched ng-valid ng-empty"><i
                                    class="iconfont icon-riqi"></i></span>
                        <em>&nbsp;&nbsp;~&nbsp;&nbsp;</em>
                        <span><input type="text" autocomplete="off" id="end_time" class="datepicker" ng-focus="remHight()"
                                     ng-class="{'error':redErr.dateTime}" placeholder="结束时间"
                                     ng-model="param.endTime" class="ng-pristine ng-untouched ng-valid ng-empty"><i
                                class="iconfont icon-riqi"></i></span>
                        <div class="se-re">
                            <select id="product_name_key" class="ng-valid ng-not-empty ng-dirty ng-valid-parse ng-touched">
                                <option value="" selected="selected">选择字段&nbsp;&nbsp;</option>
                                <option value="1">产品名称</option>
                                <option value="2">公司名称</option>
                            </select>
                            <span class="se-po"></span>
                        </div>
                        <span>
                <input type="text" autocomplete="off" id="product_name" placeholder="请输入关键字" ng-focus="remHight()" ng-model="param.keyword"
                       class="ng-pristine ng-valid ng-empty ng-touched">
            </span>
                        <button type="button" id="sousuo">
                            <i class="iconfont icon-sousuo"></i>
                        </button>
                    </div>
                    <div class="public-bghint">
                <span ng-click="showMenu()" style="cursor: pointer;">提示操作&nbsp;&nbsp;<i
                        class="iconfont icon-icon-copy-copy"></i></span>
                        <span class="calNum">筛选<span class="result "></span>条结果</span>
                    </div>
                    <ul class="public-ulList" ng-show="isMenu" ng-transclude="content">
                        <menu-content class="">
                            <li>显示拥有该栏目管理权限的数据；</li>
                            <li>拥有权限的管理员可以对产品对应的流程进行增加、修改、删除；如果没有该权限，则操作性不显示对应的操作按钮</li>
                        </menu-content>
                    </ul>
                    <div style="height: 20px;"></div>
                    <div id="workflow_list"></div>
                    <div class="public-botPage">
                        <!-- ngIf: operation.batch --><div class="public-botPage-left " ng-if="operation.batch">
                        <label id="ch_id_all">
                            &nbsp;&nbsp;&nbsp;<input type="checkbox" name="ch_id_all" ng-click="F.ch_id_all($event,'ch_id')">
                            &nbsp;全选
                        </label>
                        <div class="se-re">
                            <select id="bulk_operation" class="tabHint PoListSele ng-pristine ng-untouched ng-valid ng-not-empty" ng-model="selectType.default" ng-change="F.selectQuery('PoListSele','ch_id')">
                                <option value="" selected="selected">批量操作</option>
                                <option value="删除" path="loanBefore" params="delePo" param="type:2" ng-if="HbHr.hr57 &amp;&amp; operation._type =='orderList'" class="">删除所选</option><!-- end ngIf: HbHr.hr57 && operation._type =='orderList' -->
                            </select>
                            <span class="se-po"></span>
                        </div>
                        <!-- ngIf: HbHr.hr58 && operation._type=='orderList' --><button class="tabHint " id="product_new" ng-click="F.toggleView('loanBefore','orderRntry',$event)" params="1" ng-if="HbHr.hr58 &amp;&amp; operation._type=='orderList'">
                        新增流程
                    </button><!-- end ngIf: HbHr.hr58 && operation._type=='orderList' -->
                    </div><!-- end ngIf: operation.batch -->
                        <div class="page-container product-page-container" style="float: right; padding: 15px 0;"></div>
                    </div>
                </div>
            </div>

            <script type="text/x-handlebars-template" id="workflow_list_tpl">
                <div class="table-scroll">
                    <table class="table public-table PoInput">
                        <thead>
                        <tr>
                            <td>选择</td>
                            <td>序号</td>
                            <td>创建时间</td>
                            <td>流程名称</td>
                            <td>所属产品</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <!-- ngIf: dataList.list.length ==0 -->
                        {{#if content.[0]}}
                        {{#each content}}
                        <!-- ngRepeat: i in dataList.list -->
                        <tr class="table-tr-hover ">
                            <td ng-if="!operation.examine" class="">
                                <input type="checkbox" name="ch_id" value="{{id}}">
                            </td>
                            <td>
                                {{addOne @index}}
                            </td>
                            <td>
                                {{create_time}}
                            </td>
                            <!-- ngIf: !operation.examine -->
                            <td ng-if="!operation.examine" class="">
                                {{workflow_name}}
                            </td><!-- end ngIf: !operation.examine -->
                            {{#if product_name}}
                                <td>{{product_name}}</td>
                            {{else}}
                                <td class="">--</td>
                            {{/if}}

                            <td>
                                <div class="se-re sel-blue">
                                    <select class="tabHint operations" flow_id="{{id}}" product_id="{{product_id}}" workflow_id ="{{workflow_id}}" workflow_name="{{workflow_name}}">
                                        <option value="-1" selected>选择操作</option>
                                        {{#each ../fourthMenus}}
                                        <option value="{{key}}">{{name}}</option>
                                        {{/each}}
                                    </select>
                                    <span class="se-po-blue"></span>
                                </div>
                                <button flow_id="{{id}}" id="{{id}}" class="operations_record tabHint btnQuery524">
                                    操作记录
                                </button>
                            </td>
                        </tr>
                        {{/each}}
                        {{else}}
                        <tr>
                            <td colspan="16">暂时找不到数据</td>
                        </tr>
                        {{/if}}
                        </tbody>
                    </table>
                </div>
                </div>
            </script>
        </div>
 </div>


<%--是否删除弹窗--%>
<div class="winBox delete_winBox">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box">
        <div class="winBox5 ">
            <div>
                <div class="headerBox">
                    <!-- ngIf: recheckLoan==2 --><span class="headerSpan " ng-if="recheckLoan==2">删除流程</span>
                    <!-- end ngIf: recheckLoan==2 -->
                    <!-- ngIf: recheckLoan==1 -->
                    <!-- ngIf: recheckLoan==3 -->
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div class="deleBox">
                    <!-- 底部 -->
                    <div class="deleteTit">
                        <span class="first"><i class="iconfont icon-tips2"></i></span>
                        <!-- ngIf: recheckLoan==1 || recheckLoan==2 --><span class="">您确定删除该流程？</span>
                    </div>
                    <div class="deleFooter" style="padding: 0;">
                        <div class="deleBtn">
                            <button ng-click="btn()" id="sureDelete"
                                    style="margin: 0;margin-bottom: 30px;margin-left: 68px;">确认
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%--产品编辑,新增弹框--%>

<div class="winBox" id="product_edit_pop">
    <!-- 加载弹窗盒子容器 -->
    <div class="winBox1">
    <div class="winBox3">
        <div class="asstem">
            <div class="headerBox">
                <span class="headerSpan">编辑流程</span>
                <i class="iconfont icon-wrong headerIcon" id="product_edit_show"></i>
            </div>
            <!-- 内容 -->
            <div class="assBox">
                <div class="assHeader">
                    <span>*</span>流程名称
                </div>
                <div class="se-re public-bgDate">
                    <input type="text" autocomplete="off" id="new_workflow" placeholder="请输入流程名称" ng-focus="remHight()" ng-model="param.keyword" class="ng-pristine ng-valid ng-empty ng-touched">
                </div>
                <div class="assHeader">流程描述</div>
                <textarea style="width: 100%;height: 120px;border: 1px solid #E6E6E6;border-radius: 3px;" showtag="zishuxians"  id="new_describe" class="ng-pristine ng-untouched ng-valid ng-empty ng-valid-maxlength"></textarea>

                <div class="deleFooter" style="padding-bottom: 0;">
                    <div class="deleBtn">
                        <button id="workflow_edit">
                            确认提交
                        </button>
                    </div>
                    <div class="zishu">
                        <i id="zishuxians">200</i>字
                    </div>
                </div>
            </div>
        </div>
    </div></div>
</div>

<%--操作记录弹框--%>
<%--<div class="winBox" id="record_pop">
    <div class="winBox1 " ng-include="box"><!-- 说明： 操作记录模板 -->
        <div class="winBox3 ">
            <div class="dealrecord">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">操作记录</span>
                    <i id="record_show" class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div id="record_list" class="contentBox" style="padding-bottom: 50px;"></div>
                <!-- 中间列表 -->
                <script type="text/x-handlebars-template" id="record_list_tpl">
                    {{#IF_GT size  0}}
                    <div class="centerBox" >
                        <div class="ccc">
                            {{#each list}}
                            <div class="centerList D-takeList" style="height: auto;" >
                                <div class="centerImg">
                                    <div class="two-img">
                                        &lt;%&ndash;<img src="{{photo_url || images1}}"/>&ndash;%&gt;
                                    </div>
                                    <ul class="centerUl">
                                        <li class="centerLi0">
                                            <span>{{real_name}}</span>
                                            <span>{{role_name}}</span>
                                        </li>
                                        <li class="center-new"><span>{{operation_content}}</span></li>
                                    </ul>
                                    <div class="centerDate">{{create_time}}</div>
                                </div>
                            </div>
                        </div>
                        {{/each}}
                    </div>
                    {{/IF_GT}}
                    <div class="public-botPage-right" style="height: 50px;padding-top: 10px;padding-left: 100px;float: right;">
                        <div ng-include="pageUrl" onload="pageOnload()"></div>
                    </div>
                    {{#if_eq size 0}}
                    <div class="centerBox" ng-if="data.size<=0">
                        <div class="centerList">
                            <div class="centerImg">
                                <ul class="centerUl">
                                    <li class="centerLi1">暂无操作纪录</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    {{/if_eq}}
                    <div class="page-container record-page-container" style="float: right; padding: 15px 0;"></div>
                </script>
                <!-- 底部分页 -->
            </div>
        </div>
    </div>
</div>--%>


<script type="text/javascript" src="static/js/page/workFlow/workflow_list.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/jquery-plugin/jpager.js?_v=190102162154"></script>
<%--<script type="text/javascript" src="static/js/page/index/index.js"></script>--%>
 <%@ include file="../common/web_bottom.jsp" %>